<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>常用文档</title>
    {% load staticfiles %}
    <link type="text/css" rel="stylesheet" href="{% static "css/base.css" %}">
    <link type="text/css" rel="stylesheet" href="{% static "css/download.css" %}">
    <script src="{% static "js/download.js" %}" type="text/javascript"></script>
</head>
<body>
<div class="main">
    {% for doc in docs %}
        <div class="doc-wrap">
            <div class="doc-name">
                <a href="{{ doc.path }}">{{ doc.name }}</a>
            </div>
            <div class="doc-bottom">
                <a href="#" onclick="validateRemove({{ doc.id }})">删除</a>
            </div>
        </div>
    {% endfor %}


    <div class="doc-wrap">
        <form enctype="multipart/form-data" method="post" action="{% url 'mng:upload'%}" onsubmit="return checkUpload()">
            {% csrf_token %}

            <div class="doc-name">
                <a href="#" class="file">
                    <input type="file" name="file" id="upload_file" onchange="changeFileName(this)"/>点击选择文件
                    <input type="text" name="name" style="display: none" value="选择文件"/>
                </a>
            </div>

            <div class="doc-bottom">
                <button class="click_label" type="submit">上传</button>
            </div>
        </form>
    </div>

</div>
</body>
</html>